package com.example.im.entity

import androidx.room.*
import java.io.Serializable

@Entity(
    foreignKeys = [ForeignKey(
        entity = ChatRecordLast::class,
        parentColumns = ["id"],
        childColumns = ["last_id"],
        onDelete = ForeignKey.CASCADE
    )]
)
class ChatRecordEntire : Serializable {

    @PrimaryKey(autoGenerate = true)
    var id: Int = 0
    @ColumnInfo(name = "last_id")
    var lastId: Int = 0
    @ColumnInfo(name = "from")
    var from: String? = null
    @ColumnInfo(name = "to")
    var to: String? = null
    @ColumnInfo(name = "body")
    var body: String? = null
    @ColumnInfo(name = "itel")
    var itel: String? = null
    @ColumnInfo(name = "time")
    var time: Long = 0
    @ColumnInfo(name = "or")
    var or: Int = 0
    @ColumnInfo(name = "status")
    var status: Int = 0
}